#include "data_types.h"
#include "plat_time.h"
#include "plat_tcp.h"
#include "onenet.h"

handle_t plat_tcp_connect(const uint8_t *host, uint16_t port, uint32_t timeout_ms)
{
    return OnenetTcpConnect(host, port, timeout_ms);
}

int32_t plat_tcp_send(handle_t handle, void *buf, uint32_t len, uint32_t timeout_ms)
{
    return OnenetTcpSend(handle, buf, len, timeout_ms);
}

int32_t plat_tcp_recv(handle_t handle, void *buf, uint32_t len, uint32_t timeout_ms)
{
    return OnenetTcpRecv(handle, buf, len, timeout_ms);
}

int32_t plat_tcp_disconnect(handle_t handle)
{
    return OnenetTcpDisconnect(handle);
}
